import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import Element from 'element-plus'
import axios from 'axios'
// 引入element-ui
import 'element-plus/theme-chalk/index.css'
// 引入字体图标
import 'font-awesome/css/font-awesome.min.css'
// 引入echart
import * as echarts from 'echarts'
// import VueQuillEditor from 'vue-quill-editor'
// import 'quill/dist/quill.core.css'
// import 'quill/dist/quill.snow.css'
// import 'quill/dist/quill.bubble.css'

const app = createApp(App)
app.$echarts = echarts
app.$axios = axios
app.config.productionTip = false
app.config.silent = true
// 全局设置token
axios.interceptors.request.use(function (config) {
  const token = sessionStorage.getItem('token')
  if (token) {
    config.headers.token = token
  }
  return config
})

app.use(store).use(router).use(Element).mount('#app')
